﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace System.Work.ClientEngine.FPXH
{
    public class FPXHCommandPrefix : ICommandPrefix
    {
        /// <summary>
        /// 命令代码
        /// </summary>
        public string CommandCode { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string[] Address { get; set; }
        /// <summary>
        /// 地址个数
        /// </summary>
        public int Count { get; set; }
        
        internal CommandFormat CurFormat { set; get; }

        public FPXHCommandPrefix() { }
        public FPXHCommandPrefix(string[] address)
        {
            Address = address;
            Count = address.Length;
        }
        public FPXHCommandPrefix(string commandCode, string[] address)
        {
            Address = address;         
            CommandCode = commandCode;
        }
    }
}
